//
//  BeanObj.h
//  storeapp
//
//  Created by huangyi on 13-4-17.
//  Copyright (c) 2013年 ios. All rights reserved.
//

#import <Foundation/Foundation.h>

@class BeanTable;
@class BeanDatabase;

@interface BeanObject : NSObject

@property(nonatomic,strong)NSMutableDictionary *bean;
@property(nonatomic,strong)BeanTable *table;

-(int)store;
-(BOOL)trash;
-(NSDictionary*)dump;

-(int)getId;
-(NSString*)getString:(NSString*)field;
-(NSNumber*)getNumber:(NSString*)field;
-(NSData*)getData:(NSString*)field;
-(NSDate*)getDate:(NSString*)field;

-(void)setValue:(id)value forField:(NSString*)field;
-(void)convert:(NSDictionary*)dictionary;

@end
